const mongoose = require('mongoose')
mongoose.set('useFindAndModify', false)
const roleSchema = mongoose.Schema({
  roleName: String,
  remark: String,
  createTime: { type: Date, default: Date.now() },
  permissionList: {
    checkedKeys: [],
    halfCheckedKeys: [],
  },
  updateTime: {
    type: Date,
    default: Date.now(),
  },
})
module.exports = mongoose.model('roles', roleSchema, 'roles')
